{include file="public_iframe:head"}
<body class="gray-bg">
	<div class="wrapper wrapper-content animated fadeInRight">
	    <div class="ibox float-e-margins">
	        <div class="ibox-title">
	            <h5>运单填写</h5>
	        </div>
	        <div class="ibox-content">
	            <form  method="post" enctype="multipart/form-data" id="brandForm" class="form-horizontal">
	                <div class="form-group">
	                    <label class="col-sm-2 control-label">运单</label>
	                    <div class="col-sm-6">
	                        <input type="text" name="shipping_number" class="form-control" value="" placeholder="" min="0" >
	                    </div>
	                </div>
	                <div class="hr-line-dashed"></div>
	                <input type="button" onclick="Submit()" class="link_btn" value="提交"/>
	                <input type="hidden" class="link_btn" name="id" value="{$id}"/>
	            </form>
	        </div>
	    </div>
	</div>
	<script type="text/javascript">
		function Submit(){
			var id = $('input[name="id"]').val();
			var shipping_number = $('input[name="shipping_number"]').val();
			var formData = new FormData();

			if(shipping_number == ''){
				parent.layer.msg('运单不能为空');
				return false;
			}

			formData.append('id',id);
        	formData.append('shipping_number',shipping_number);

			$.ajax({
            url:"{:url('Order/send_ship')}",
            type:'POST',
            data:formData,
            async:false,
            processData:false,
            contentType:false,
            success:function(result) {
            	parent.reload();
                parent.layer.close(parent.layer.index);
            }
        });

		}

	</script>
</body>
</html>